home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Unix / malloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-15  |  859 b   |  34 lines  |  [TEXT/????]

  1. #ifndef _XMALLOC_H_
  2. #define _XMALLOC_H_
  3.  
  4. extern char *malloc();
  5. extern char *calloc();
  6. extern char *realloc();
  7. extern char *valloc();
  8. extern char *memalign();
  9.  
  10. /*
  11.  *  As far as the user in concerned, this is an opaque struct. Maybe
  12.  *  define it as struct { int foo } and use the real definition inside
  13.  *  group.c?
  14.  */
  15. typedef struct {
  16.     char *head;    /* The head of the linked list of objects */
  17.     int magic;    /* Just to make sure we really were passed a MemGroup */
  18.     int count;    /* Not strictly necessary, handy for debugging */
  19. } MemGroup;
  20.  
  21. extern MemGroup *group_create();
  22. extern char *group_malloc();
  23.  
  24. /*
  25.  *  You may or may not want this - In gcc version 1.30, on Sun3s running
  26.  *  SunOS3.5, this works fine.
  27.  */
  28. #if defined(__GNUC__)
  29. #define alloca(n) __builtin_alloca(n)
  30. #endif /* __GNUC__
  31.  
  32. /* Don't put anything after this line */
  33. #endif /* _XMALLOC_H_ */
  34.